import Vue from 'vue'
import Router from 'vue-router'


import HelloWorld from '@/components/HelloWorld'
import outshop_lzy from '@/page/outshop_lzy'
import inshop_lzy from '@/page/inshop_lzy'
import shoptype_bdl from '@/page/shoptype_bdl'
import shop from '@/page/shop_bdl.vue'
import dao from '@/page/dao_quan.vue'
import echarts from '@/page/echarts_quan.vue'
import uservue from '@/page/usermanage_quan.vue'
import usercen from '@/page/usercen_quan.vue'
import login from '@/page/login_zyc.vue'
import add from '@/page/add_zyc.vue'




Vue.use(Router)
export default new Router({
	routes: [{
			path: '/',
			name: 'login',
			component: login
		},
		{
			path: '/dao',
			name: 'dao',
			component: dao,
			meta: {
				requireAuth: true
			},
			children: [{
					path: '/inshop',
					name: 'inshop',
					component: inshop_lzy
				},
				{
					path: '/shoptype',
					name: 'shoptype',
					component: shoptype_bdl
				},
				{
					path: '/shop',
					name: 'shop',
					component: shop
				},
				{
					path: '/outshop',
					name: 'outshop',
					component: outshop_lzy
				},
				{
					path: '/echarts',
					name: 'echarts',
					component: echarts
				},
				{
					path: '/uservue',
					name: 'uservue',
					component: uservue
				},
				{
					path: '/usercen',
					name: 'usercen',
					component: usercen
				}
			]

		},

		{
			path: '/login',
			name: 'login',
			component: login
		},
		{
			path: '/add',
			name: 'add',
			component:add
		}
	]
})
//还是在router.js中 我们这里就放在 export default router 的后面
//登录拦截

